package com.core.aspectj.util;

import android.util.Log;

import org.aspectj.lang.ProceedingJoinPoint;

public class AopLog {

    private static final String TAG="AOP";

    /**
     *  方法前打印日志
     * @param joinPoint
     */
    public static void iFront(final ProceedingJoinPoint joinPoint){
        Object t = joinPoint.getTarget();
        String clsName = t.getClass().getSimpleName();
        String methodName = joinPoint.getSignature().getName();
        Log.i(TAG,StringCompat.toString(clsName," ",methodName,"+++++"));

    }

    /**
     *   方法后打印日志
     * @param joinPoint
     */
    public static void iAfter(final ProceedingJoinPoint joinPoint){
        Object t = joinPoint.getTarget();
        String clsName = t.getClass().getSimpleName();
        String methodName = joinPoint.getSignature().getName();
        Log.i(TAG,StringCompat.toString(clsName," ",methodName,"------"));
    }
}
